#include "MyString.h"

void test1()
{
	lw::string s1 = "hello world";
	lw::string s2;
	s2 = s1;

	s1.print();
	s2.print();
}

void test2()
{
	lw::string s1 = "hello world";
	s1 += ' ';
	s1 += "hello bi";
	s1.print();
}

void test3()
{
	lw::string s1 = "hello world";
	lw::string::iterator it = s1.begin();
	while (it != s1.end())
	{
		cout << *it;
		++it;
	}
	cout << endl;
	s1.resize(14, 'x');
	s1.print();
	s1.resize(5);
	s1.print();
}

void test4()
{
	lw::string s1 = "hello world";
	s1.insert(5, 'a');
	s1.print();
	s1.insert(0, "sllslsls");
	cout << s1;
	size_t n = s1.size();
	s1.erase(0, 8);
	s1.erase(5, 1);
	s1.print();
}

void test5()
{
	lw::string s;
	cin >> s;
	cout << s;
}

int main()
{
	//test1();
	//test2();
	//test3();
	//test4();
	test5();
	return 0;
}